package com.itheima.d1_reflect_class;

/**
 * 反射获取对象
 */
public class demo1 {
    public static void main(String[] args) throws ClassNotFoundException {
        //1.Class类中的一个静态方法(全限名)
        Class c = Class.forName("com.itheima.d1_reflect_class.Student");
        System.out.println(c);

        //2.类名.class
        Class c1 = Student.class;
        System.out.println(c1);

        //3.对象.getClass() 获取对象对应的Class对象
        Student s = new Student();
        Class c2 = s.getClass();
        System.out.println(c2);
    }
}
